<div class="title"><?php echo __('LIST_OF_ID_UPLOADED'); ?></div>
<div id='idsresponse' class="contactUploadList">
    <div class="list">
        <table style="width: 100%;" class="list">
            <tr>
                <th style="width:60%;"><?php echo __('FILE_NAME');?></th>
                <th style="width:15%;"><?php echo __('UPLOADED_BY');?></th>
                <th style="width:15%;"><?php echo __('DATE');?></th>
                <th style="width:10%;"><?php echo __('ACTION');?></th>
            </tr>
            <?php
            if(isset($this->request->data['File'])){
                 $i = 1;
                foreach ($this->request->data['File'] as $contacts){
                    if($contacts['type'] == 'id'){?>
                        <tr class="<?php echo ($i % 2 == 0) ? 'even' : 'odd'; ?>">
                            <td><?php echo $contacts['file_name']; ?></td>
                            <td><?php echo isset($userData[$contacts['upload_by']]) ? $userData[$contacts['upload_by']] : '--'; ?></td>
                            <td><?php echo date('M j, Y', strtotime($contacts['created'])); ?></td>
                            <td><?php 
                                echo $this->Js->link(
                                    $this->Html->image('icons/16/cross.png', array('title'=>'Delete File')),
                                    array('controller' => 'payees', 
                                        'action' => 'delete/'.$contacts['id']."/".$this->request->data['Payee']['id']."/ids_edit"
                                    ),
                                    array(
                                        'update' => '#idsFile',
                                        'escape'=>false,
                                        'before' => $this->Js->get('#processingDiv2')->effect('fadeIn'),
                                        'success' => $this->Js->get('#processingDiv2')->effect('fadeOut'),
                                        'confirm' => 'Are you sure you wish to delete this ID File?'
                                    )
                                );
                                echo '&nbsp;&nbsp;';
                                echo $this->HTML->link(
                                    $this->Html->image('icons/16/copy-image.jpeg', array('title'=>'Download File')),
                                    array('controller' => 'payees', 
                                        'action' => 'download_file/'.$contacts['id']
                                    ),
                                    array('escape'=>false)
                                );
                            ?></td>
                        </tr><?php
                        $i++;
                    }
                }
                echo $this->Js->writeBuffer();
            }
            ?>
        </table>
    </div>
</div>
<div id="processingDiv2" style="display: none;"><?php echo $this->Html->image('ajax_progress2.gif') ;?></div>
<?php 
    //echo $this->Form->file('FileUploadIDs. ', array('type'=>'file', 'id' =>'upload_files_ids', 'multiple', 'style' => 'display:none;')); 
?>
<!--<div  class="uploadFiles" onclick="browseIdFile();">
    <?php //echo __('UPLOAD_FILES'); ?> 
</div>
<div  class="deleteFiles" onclick="deleteIdFile();">
    <?php //echo __('DELETE_FILES'); ?> 
</div>-->